using UnityEngine;
using UnityEngine.UI;

namespace Voodoo.Sauce.Internal.GDPR.UI
{
	public class AutoLandscapeUI : MonoBehaviour
	{
		private void Start()
		{
			if (Input.deviceOrientation != DeviceOrientation.LandscapeLeft && Input.deviceOrientation != DeviceOrientation.LandscapeRight && Screen.width <= Screen.height)
			{
				return;
			}
			CanvasScaler component = GetComponent<CanvasScaler>();
			if ((bool)component)
			{
				component.matchWidthOrHeight = 0.82f;
				return;
			}
			RectTransform component2 = GetComponent<RectTransform>();
			if ((bool)component2)
			{
				component2.offsetMin = new Vector2(400f, 200f);
				component2.offsetMax = new Vector2(-400f, -120f);
			}
		}
	}
}
